package cn.singno.bob.common.utils;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * <p>名称：ConfigurationHelper.java</p>
 * <p>描述：读取配置文件的工具类</p>
 * <pre>
 *    
 * </pre>
 * @author 鲍建明
 * @date 2014年8月6日 上午10:15:19
 * @version 1.0.0
 */
public class ConfigurationHelper  {
	
	private static Log logger = LogFactory.getLog(ConfigurationHelper.class);

	public static Configuration getConfiguration(String fileName){
		try {
			return new PropertiesConfiguration(fileName);
		} catch (ConfigurationException e) {
			logger.error("加载【" +fileName+"】配置文件失败" , e);
		}
		return null;
	}
	
}
